﻿<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="StudentListControl.ascx.vb" Inherits="SISSAT.WebDevelopment.Shared.UserControls.StudentListControl" %>

<table class="students">
    <asp:Repeater ID="studentRepeater" runat="server">
        <HeaderTemplate>
            <tr class="header">
		        <td class="col1">ID</td>
		        <td class="col2">Name</td>
		        <td class="col3">Contact No.</td>
		        <td class="col4">Prelims</td>
                <td class="col4">Midterm</td>
                <td class="col4">Pre-finals</td>
                <td class="col4">Finals</td>
                <td class="col5">Grade Point</td>
	        </tr>
            <tr>
                <td colspan="8"><hr /></td>
            </tr>
        </HeaderTemplate>
        <ItemTemplate>
            <tr class="contentdata">
		        <td>
                    <%If Me.IsUserAnInstructorForSchedule Then%>
                        <a href="/Pages/Home/Employees.aspx?code=<%#Eval("EmployeeCode")%>" class="fcolor1" title="View Information of <%#Eval("EmployeeName")%>"><%#Eval("EmployeeCode")%></a>
                    <%Else%>
                        <%#Eval("EmployeeCode")%>
                    <%End If%>
		        </td>
		        <td class="alignl"><%#Eval("EmployeeName")%></td>
		        <td class="alignl"><%#Eval("ContactNumber")%></td>
		        <td>
                    <%If Me.IsUserAnInstructorForSchedule Then%>
                        <%If Me.IsGradeEditable Then%>
                            <a href="/Pages/Home/Grades.aspx?code=<%#Eval("EmployeeCode")%>&scid=<%#Eval("ScheduleId")%>&etid=9" class="fcolor1" title="Edit Grade"><%#Eval("Preliminary")%></a>
                        <%Else%>
                            <%#Eval("Preliminary")%>
                        <%End If%>
			            
                    <%Else%>
                        Confidential
                    <%End If%>
		        </td>
                <td>
                    <%If Me.IsUserAnInstructorForSchedule Then%>
                        <%If Me.IsGradeEditable Then%>
                            <a href="/Pages/Home/Grades.aspx?code=<%#Eval("EmployeeCode")%>&scid=<%#Eval("ScheduleId")%>&etid=10" class="fcolor1" title="Edit Grade"><%#Eval("Midterm")%></a>
                        <%Else%>
                            <%#Eval("Midterm")%>
                        <%End If%>
			            
                    <%Else%>
                        Confidential
                    <%End If%>
                </td>
                <td>
                    <%If Me.IsUserAnInstructorForSchedule Then%>
                        <%If Me.IsGradeEditable Then%>
                            <a href="/Pages/Home/Grades.aspx?code=<%#Eval("EmployeeCode")%>&scid=<%#Eval("ScheduleId")%>&etid=11" class="fcolor1" title="Edit Grade"><%#Eval("Prefinals")%></a>
                        <%Else%>
                            <%#Eval("Prefinals")%>
                        <%End If%>
			            
                    <%Else%>
                        Confidential
                    <%End If%>
                </td>
                <td>
                    <%If Me.IsUserAnInstructorForSchedule Then%>
                        <%If Me.IsGradeEditable Then%>
                            <a href="/Pages/Home/Grades.aspx?code=<%#Eval("EmployeeCode")%>&scid=<%#Eval("ScheduleId")%>&etid=12" class="fcolor1" title="Edit Grade"><%#Eval("Finals")%></a>
                        <%Else%>
                            <%#Eval("Finals")%>
                        <%End If%>
			            
                    <%Else%>
                        Confidential
                    <%End If%>
                </td>
                <td><%#Eval("GradePoint")%></td>
	        </tr>
        </ItemTemplate>
    </asp:Repeater>
</table>